package com.czy.owner.api;

import com.czy.owner.net.api.BaseApi;
import com.czy.owner.net.listener.HttpOnNextListener;
import com.trello.rxlifecycle.components.support.RxAppCompatActivity;

import retrofit2.Retrofit;
import rx.Observable;

/**
 * Created by asus on 2017/6/5.
 */

public class LuckDrawSuccessApi extends BaseApi {
    private String session;
    private String platform;
    private String goodsActivityId;

    public LuckDrawSuccessApi(HttpOnNextListener listener, RxAppCompatActivity rxAppCompatActivity) {
        super(listener, rxAppCompatActivity);
        setCache(false);
        setCookieNetWorkTime(0);
        setShowProgress(false);
    }

    public String getPlatform() {
        return platform;
    }

    public void setPlatform(String platform) {
        this.platform = platform;
    }

    public String getGoodsActivityId() {
        return goodsActivityId;
    }

    public void setGoodsActivityId(String goodsActivityId) {
        this.goodsActivityId = goodsActivityId;
    }

    public String getSession() {
        return session;
    }


    public void setSession(String session) {
        this.session = session;
    }

    @Override
    public Observable getObservable(Retrofit retrofit) {
        HttpPostService service = retrofit.create(HttpPostService.class);

        return service.addUserLuckDrawCount(getSession(), getPlatform(), getGoodsActivityId());
    }
}
